Skip to content

lint: upgrade linting environment to ECMAScript 2022#1030

Merged
UlisesGascon merged 1 commit into
expressjs:v2from
raphendyr:upgrade-lint-env
Mar 18, 2025
Merged

lint: upgrade linting environment to ECMAScript 2022#1030
UlisesGascon merged 1 commit into
expressjs:v2from
raphendyr:upgrade-lint-env

Conversation

@raphendyr

@raphendyr raphendyr commented Mar 18, 2025

Copy link
Copy Markdown

This PR updates the eslint JavaScript linting environment to the 2022 standard. This is based on the wanted Node 18 support and aligns with data in node.green. More importantly, this is what is used in the main express repo currently, see expessjs/express/.eslintrc.yml.

In addition to setting the ES version, we set node environment. It's not needed, I think, but makes the file match more with the main repo. The documentation for that says "Node.js global variables and Node.js scoping".

See comments below about added rule and the rule we have, which doesn't exists in the main repo.

Comment thread .eslintrc.yml
Comment thread .eslintrc.yml
Comment thread README.md
## API

```js
var session = require('express-session')

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line yielded the following error.

.../express-session/README.md
  21:5  error  'session' is assigned a value but never used  no-unused-vars

✖ 1 problem (1 error, 0 warnings)

Instead of skipping this, I though it would be ok to expand this introduction usage a bit. What do you think?

Comment thread README.md

@UlisesGascon UlisesGascon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for investing time on this @raphendyr ❤️!

@UlisesGascon
UlisesGascon merged commit 8e18762 into expressjs:v2 Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants